<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="kr.cadis.clms.dao.DailySpendDao, kr.cadis.clms.model.DailySpend, java.util.List, java.sql.Date" %>    
<%
	DailySpendDao dailySpendDao = new DailySpendDao();
	List<DailySpend> dailySpends = dailySpendDao.sumTotalSpendMoneyForMonth();
%>    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<table border="1">
	<tr><th>월</th><th>사용금액</th></tr>
<%
	for(DailySpend dailySpend : dailySpends) {
%>	
	<tr>
		<td><%= dailySpend.getMonths() %>월</td>
		<td style="text-align: right;"><%= String.format("%,d", dailySpend.getSumMoney()) %></td>
	</tr>
<%
	}
%>	
</table>
<br />
<a href="/CLMSWeb/index.jsp">처음화면으로 돌아가기</a>
</body>
</html>